home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
LocaleObjects.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
7KB
|
204 lines
/*
File: LocaleObjects.h
Contains: LocaleObject Manager interfaces
Version: Technology: System 8
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __LOCALEOBJECTS__
#define __LOCALEOBJECTS__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __TEXTOBJECTS__
#include <TextObjects.h>
#endif
#ifndef __TEXTCOMMON__
#include <TextCommon.h>
#endif
#ifndef __FILEMANAGERTYPES__
#include <FileManagerTypes.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if FOR_SYSTEM8_PREEMPTIVE
/* Locale errors*/
typedef OSStatus LocaleErrors;
typedef UInt16 LocaleIterateOp;
enum {
kLocaleForwardIterate = 0,
kLocaleBackwardIterate = 1
};
typedef SInt16 LocaleNameIdentifier;
enum {
kLocaleObjectKeyNameIndex = 0,
kLocaleObjectUserName = 1,
kLocaleObjectCopyrightString = 2,
kLocaleObjectManufacturerString = 3,
kLocaleObjectFunctionDescription = 4,
kLocaleObjectVersionString = 5
};
typedef LocaleNameIdentifier LocaleDefaultValue;
enum {
kLocaleLanguageID = 0x000A, /* language id */
kLocaleLanguageLocalizedName = 0x1001, /* localized name of language */
kLocaleLanguageEnglishName = 0x000B, /* English name of language */
kLocaleAbbreviatedLanguageName = 0x000C, /* abbreviated language name */
kLocaleLanguageNativeName = 0x000D, /* native name of language */
kLocaleCountryCode = 0x000E, /* country code */
kLocaleLocalizedCountryName = 0x000F, /* localized name of country */
kLocaleEnglishCountryName = 0x1002, /* English name of country */
kLocaleAbbreviatedCountryName = 0x001F, /* abbreviated country name */
kLocaleNativeCountryName = 0x002F, /* native name of country */
kLocaleDefaultLanguageID = 0x003F, /* default language id */
kLocaleDefaultCountryCode = 0x004F /* default country code */
};
typedef UInt16 LocaleObjectContext;
enum {
kLocaleObjectIsGlobal = 0,
kLocaleObjectIsLocal = 1
};
typedef OSType LocaleDataTag;
typedef UInt32 LocaleObjectTagIndex;
typedef struct OpaqueLocaleRef* LocaleRef;
typedef struct OpaqueLocaleIteratorReference* LocaleIteratorReference;
typedef struct OpaqueLocaleObjectRef* LocaleObjectRef;
struct NameValuePair {
StringPtr name;
ByteCount valueLength;
void * value;
};
typedef struct NameValuePair NameValuePair;
typedef NameValuePair *NameValuePairPtr;
struct NameTableEntry {
LocaleNameIdentifier nameID;
UInt16 reserved;
TextObject name;
};
typedef struct NameTableEntry NameTableEntry;
#define kExecutableCfragName "\pexecutablecfrag"
#define kSOMClassName "\psomclass"
#define kUserVisibleName "\puservisiblename"
#define kScriptName "\pscript"
#define kLanguageName "\planguage"
#define kRegionName "\pregion"
#define kResIDName "\presid"
#define kEncodingName "\pencoding"
#define kTextServiceTypeName "\ptextservice"
#define kInputMethodTypeName "\pkeyboardinputmethod"
#define kLocaleIdentifierName "\plocaleidentifier"
extern LocaleRef GetCurrentProcessLocaleRef(void );
extern OSStatus GetLocaleReference(LocaleIdentifier identifier, LocaleRef *locale);
extern OSStatus LocaleIteratorCreate(LocaleRef locale, ConstStr255Param keyName, ItemCount countAttributes, const NameValuePair *attributes, LocaleIteratorReference *localeIteratorRef);
extern OSStatus LocaleIteratorDispose(LocaleIteratorReference localeIteratorRef);
/*
The void * returned as the dataPtr and the LocaleObjectRef * both
point into read-only memory. Use const to invoke the compiler's help
in preventing write-accesses to that data.
*/
extern OSStatus LocaleIterate(LocaleIteratorReference localeIteratorRef, LocaleIterateOp op, const void **dataPtr, ByteCount *dataSize, LocaleObjectRef *objectRef);
extern OSStatus GetLocaleObjectName(LocaleObjectRef objectRef, LocaleNameIdentifier nameID, TextEncoding encoding, LocaleIdentifier languageRegion, ByteCount *nameSize, TextObject name);
extern OSStatus GetLocaleObjectKeyName(LocaleObjectRef objectRef, Str255 keyName);
extern OSStatus GetLocaleObjectData(LocaleObjectRef objectRef, const void **localeObjectData, ByteCount *dataSize);
extern OSStatus GetLocaleObjectAttributes(LocaleObjectRef objectRef, const NameValuePair **attributes, ItemCount *countPairs);
extern OSStatus GetLocaleObjectFSObjectRef(LocaleObjectRef localeObjRef, FSObjectRef *fileRef);
extern OSStatus GetLocaleObjectLocale(LocaleObjectRef objectRef, LocaleRef *locale, LocaleIdentifier *localeID);
extern OSStatus GetLocaleObjectMemoryContext(LocaleObjectRef objectRef, LocaleObjectContext *context);
extern OSStatus SetLocaleIterator(LocaleRef locale, ConstStr255Param keyName, ItemCount countAttributes, const NameValuePair *attributes, LocaleIteratorReference *localeIteratorRef);
extern OSStatus SearchOneLocaleObject(LocaleRef locale, ConstStr255Param keyName, ItemCount countAttributes, const NameValuePair *attributes, const void **localeObjectData, ByteCount *dataSize, const LocaleObjectRef *objectRef);
extern OSStatus AddLocaleObject(LocaleRef locale, void *localeObjectData, ByteCount objectSize, ConstStr255Param keyName, ItemCount countUserNames, const NameTableEntry *userNames, ItemCount countAttributes, const NameValuePair *attributes, LocaleObjectRef *objectRef);
extern OSStatus RemoveLocaleObject(LocaleObjectRef objectRef);
extern ItemCount CountLocaleObjectAssociatedDataTags(LocaleObjectRef objectRef);
extern OSStatus GetIndexedAssociatedData(LocaleObjectRef objectRef, LocaleObjectTagIndex tagIndex, LocaleDataTag *tag, const void **associatedDataPtr, ByteCount *size);
extern OSStatus GetLocaleObjectAssociatedData(LocaleObjectRef objectRef, LocaleDataTag tag, const void **associatedDataPtr, ByteCount *size);
extern ItemCount CountInstalledLocales(void );
extern OSStatus GetFirstLocale(LocaleRef *locale, LocaleIdentifier *localeID);
extern OSStatus GetNextLocale(LocaleRef *locale, LocaleIdentifier *localeID);
extern OSStatus SetCurrentProcessLocale(LocaleIdentifier localeID, LocaleRef *locale);
extern LocaleRef GetSystemDefaultLocale(void );
extern LocaleIdentifier GetSystemLocaleIdentifier(void );
extern LocaleIdentifier GetCurrentProcessLocaleIdentifier(void );
extern LocaleIdentifier GetLocaleRefLocaleIdentifier(LocaleRef locale);
extern OSStatus GetDefaultLocaleObject(LocaleRef locale, ConstStr255Param keyName, LocaleObjectRef *objectRef);
extern OSStatus SetDefaultLocaleObject(LocaleRef locale, LocaleObjectRef objectRef);
extern OSStatus GetLocaleInformation(LocaleRef locale, LocaleDefaultValue infoIndex, TextObject *infoText);
#endif
/* FOR_SYSTEM8_PREEMPTIVE*/
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __LOCALEOBJECTS__ */